package com.eonmind.pay.service;

import com.eonmind.common.contract.data.response.ResponseEntity;
import com.eonmind.common.provider.entity.pay.Cart;
import com.eonmind.common.provider.entity.pay.Order;
import com.eonmind.common.provider.entity.vip.VipPackage;
import com.eonmind.pay.dto.OrderDto;
import com.mongoplus.service.IService;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public interface OrderService extends IService<Order> {

    Order findSameNoPayOrder(Integer type, Long userId, double amount, List<Cart> carts);

    Boolean getPayStatus(Long orderId);

    void updateOrderStatusAndPayTime(long orderNo, Integer code, long payTime);

    ResponseEntity<OrderDto> pageOrder(Long id, OrderDto.OrderPageRequest pageRequest);

    List<Order> getNoPayByDuration(int minutes);

    ResponseEntity<OrderDto.OrderResDto> getOrderById(Long id);

    ResponseEntity<List<OrderDto.OrderResDto>> getRecentOrder(Long id);

    ResponseEntity<Boolean> deleteOrder(Order order);
}
